<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: include/hardware/dma.h Source File</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.0.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('rp2__common_2hardware__dma_2include_2hardware_2dma_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle"><div class="title">dma.h</div></div>
</div><!--header-->
<div class="contents">
<a href="rp2__common_2hardware__dma_2include_2hardware_2dma_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> */</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="preprocessor">#ifndef _HARDWARE_DMA_H</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#define _HARDWARE_DMA_H</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &quot;<a class="code" href="pico_8h.html">pico.h</a>&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &quot;hardware/structs/dma.h&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &quot;hardware/regs/dreq.h&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include &quot;pico/assert.h&quot;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#include &quot;hardware/regs/intctrl.h&quot;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="comment">// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_HARDWARE_DMA, Enable/disable hardware_dma assertions, type=bool, default=0, group=hardware_dma</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><span class="preprocessor">#ifndef PARAM_ASSERTIONS_ENABLED_HARDWARE_DMA</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="preprocessor">#ifdef PARAM_ASSERTIONS_ENABLED_DMA </span><span class="comment">// backwards compatibility with SDK &lt; 2.0.0</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="preprocessor">#define PARAM_ASSERTIONS_ENABLED_HARDWARE_DMA PARAM_ASSERTIONS_ENABLED_DMA</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span><span class="preprocessor">#define PARAM_ASSERTIONS_ENABLED_HARDWARE_DMA 0</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span><span class="preprocessor">#ifndef DMA_IRQ_NUM</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga6c72cc3aafb409371f60fefd0463e289">   56</a></span><span class="preprocessor">#define DMA_IRQ_NUM(irq_index) (DMA_IRQ_0 + (irq_index))</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> check_dma_channel_param(__unused uint channel) {</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span><span class="preprocessor">#if PARAM_ASSERTIONS_ENABLED(HARDWARE_DMA)</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>    <span class="comment">// this method is used a lot by inline functions so avoid code bloat by deferring to function</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>    <span class="keyword">extern</span> <span class="keywordtype">void</span> check_dma_channel_param_impl(uint channel);</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>    check_dma_channel_param_impl(channel);</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>}</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> check_dma_timer_param(__unused uint timer_num) {</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>    valid_params_if(HARDWARE_DMA, timer_num &lt; NUM_DMA_TIMERS);</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>}</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span><span class="keyword">inline</span> <span class="keyword">static</span> <a class="code hl_struct" href="structdma__channel__hw__t.html">dma_channel_hw_t</a> *dma_channel_hw_addr(uint channel) {</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span>    check_dma_channel_param(channel);</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>    <span class="keywordflow">return</span> &amp;dma_hw-&gt;ch[channel];</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>}</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gae1b3c916746b3d2052f21b7dda34aab9">dma_channel_claim</a>(uint channel);</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gaa430bc53dc2b36d727ad976f6348c8b3">dma_claim_mask</a>(uint32_t channel_mask);</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span> </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gac50200739b88a2fd52316f4150533035">dma_channel_unclaim</a>(uint channel);</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span> </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga0211681c906ebe4971d0cded8e98f8b5">dma_unclaim_mask</a>(uint32_t channel_mask);</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span> </div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span><span class="keywordtype">int</span> <a class="code hl_function" href="group__hardware__dma.html#ga4b0a6680795b9c9ed787362a8a057206">dma_claim_unused_channel</a>(<span class="keywordtype">bool</span> required);</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span> </div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__dma.html#ga9aadb81f53b979bde1c1a81164d1eff2">dma_channel_is_claimed</a>(uint channel);</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span> </div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gaccecdff367b06a019373e9a55d4f3e01">  143</a></span><span class="keyword">enum</span> <a class="code hl_enumeration" href="group__hardware__dma.html#gaccecdff367b06a019373e9a55d4f3e01">dma_channel_transfer_size</a> {</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ggaccecdff367b06a019373e9a55d4f3e01abd7d246406a2ebe4dd49780db176dc3c">  144</a></span>    <a class="code hl_enumvalue" href="group__hardware__dma.html#ggaccecdff367b06a019373e9a55d4f3e01abd7d246406a2ebe4dd49780db176dc3c">DMA_SIZE_8</a> = 0,    </div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ggaccecdff367b06a019373e9a55d4f3e01a2e343022ac046b6b67bb99eebc833cfc">  145</a></span>    <a class="code hl_enumvalue" href="group__hardware__dma.html#ggaccecdff367b06a019373e9a55d4f3e01a2e343022ac046b6b67bb99eebc833cfc">DMA_SIZE_16</a> = 1,   </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span>    <a class="code hl_enumvalue" href="group__hardware__dma.html#ggaccecdff367b06a019373e9a55d4f3e01abf1030013f4ad74b45d25cd9a07b6296">DMA_SIZE_32</a> = 2    </div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ggaccecdff367b06a019373e9a55d4f3e01abf1030013f4ad74b45d25cd9a07b6296">  147</a></span>};</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span> </div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"><a class="line" href="structdma__channel__config.html">  149</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span>    uint32_t ctrl;</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span>} <a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a>;</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span> </div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"><a class="line" href="group__channel__config.html#ga28d1103cea7f7d73406a2aee44bfebd9">  160</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__channel__config.html#ga28d1103cea7f7d73406a2aee44bfebd9">channel_config_set_read_increment</a>(<a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *c, <span class="keywordtype">bool</span> incr) {</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span>    c-&gt;ctrl = incr ? (c-&gt;ctrl | DMA_CH0_CTRL_TRIG_INCR_READ_BITS) : (c-&gt;ctrl &amp; ~DMA_CH0_CTRL_TRIG_INCR_READ_BITS);</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span>}</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span> </div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"><a class="line" href="group__channel__config.html#ga864c9d35a39c315f2972b7272f860e9e">  171</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__channel__config.html#ga864c9d35a39c315f2972b7272f860e9e">channel_config_set_write_increment</a>(<a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *c, <span class="keywordtype">bool</span> incr) {</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span>    c-&gt;ctrl = incr ? (c-&gt;ctrl | DMA_CH0_CTRL_TRIG_INCR_WRITE_BITS) : (c-&gt;ctrl &amp; ~DMA_CH0_CTRL_TRIG_INCR_WRITE_BITS);</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span>}</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span> </div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"><a class="line" href="group__channel__config.html#ga7c5a515cf1cfc6a8889464250b1e375b">  190</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__channel__config.html#ga7c5a515cf1cfc6a8889464250b1e375b">channel_config_set_dreq</a>(<a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *c, uint dreq) {</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span>    assert(dreq &lt;= <a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014ae683f0bb3ee8b854fe4cea850cf9d4c8">DREQ_FORCE</a>);</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span>    c-&gt;ctrl = (c-&gt;ctrl &amp; ~DMA_CH0_CTRL_TRIG_TREQ_SEL_BITS) | (dreq &lt;&lt; DMA_CH0_CTRL_TRIG_TREQ_SEL_LSB);</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span>}</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span> </div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"><a class="line" href="group__channel__config.html#ga7df3433a59311b83289490586f1242c8">  204</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__channel__config.html#ga7df3433a59311b83289490586f1242c8">channel_config_set_chain_to</a>(<a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *c, uint chain_to) {</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span>    assert(chain_to &lt;= NUM_DMA_CHANNELS);</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span>    c-&gt;ctrl = (c-&gt;ctrl &amp; ~DMA_CH0_CTRL_TRIG_CHAIN_TO_BITS) | (chain_to &lt;&lt; DMA_CH0_CTRL_TRIG_CHAIN_TO_LSB);</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span>}</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span> </div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"><a class="line" href="group__channel__config.html#gad1a02fcee90d21f133460006b025bac0">  218</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__channel__config.html#gad1a02fcee90d21f133460006b025bac0">channel_config_set_transfer_data_size</a>(<a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *c, <span class="keyword">enum</span> <a class="code hl_enumeration" href="group__hardware__dma.html#gaccecdff367b06a019373e9a55d4f3e01">dma_channel_transfer_size</a> size) {</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>    assert(size == <a class="code hl_enumvalue" href="group__hardware__dma.html#ggaccecdff367b06a019373e9a55d4f3e01abd7d246406a2ebe4dd49780db176dc3c">DMA_SIZE_8</a> || size == <a class="code hl_enumvalue" href="group__hardware__dma.html#ggaccecdff367b06a019373e9a55d4f3e01a2e343022ac046b6b67bb99eebc833cfc">DMA_SIZE_16</a> || size == <a class="code hl_enumvalue" href="group__hardware__dma.html#ggaccecdff367b06a019373e9a55d4f3e01abf1030013f4ad74b45d25cd9a07b6296">DMA_SIZE_32</a>);</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span>    c-&gt;ctrl = (c-&gt;ctrl &amp; ~DMA_CH0_CTRL_TRIG_DATA_SIZE_BITS) | (((uint)size) &lt;&lt; DMA_CH0_CTRL_TRIG_DATA_SIZE_LSB);</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span>}</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno">  222</span> </div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"><a class="line" href="group__channel__config.html#gadd7ee73f3652261ae5e195b709cc6dc0">  238</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__channel__config.html#gadd7ee73f3652261ae5e195b709cc6dc0">channel_config_set_ring</a>(<a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *c, <span class="keywordtype">bool</span> write, uint size_bits) {</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span>    assert(size_bits &lt; 32);</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno">  240</span>    c-&gt;ctrl = (c-&gt;ctrl &amp; ~(DMA_CH0_CTRL_TRIG_RING_SIZE_BITS | DMA_CH0_CTRL_TRIG_RING_SEL_BITS)) |</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span>              (size_bits &lt;&lt; DMA_CH0_CTRL_TRIG_RING_SIZE_LSB) |</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno">  242</span>              (write ? DMA_CH0_CTRL_TRIG_RING_SEL_BITS : 0);</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno">  243</span>}</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno">  244</span> </div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"><a class="line" href="group__channel__config.html#ga43c3a2dd43fe7e962b1de0e90a46bb9e">  254</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__channel__config.html#ga43c3a2dd43fe7e962b1de0e90a46bb9e">channel_config_set_bswap</a>(<a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *c, <span class="keywordtype">bool</span> bswap) {</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno">  255</span>    c-&gt;ctrl = bswap ? (c-&gt;ctrl | DMA_CH0_CTRL_TRIG_BSWAP_BITS) : (c-&gt;ctrl &amp; ~DMA_CH0_CTRL_TRIG_BSWAP_BITS);</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno">  256</span>}</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno">  257</span> </div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"><a class="line" href="group__channel__config.html#ga8ccbf80d437f895f95ad0531197dcaab">  268</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__channel__config.html#ga8ccbf80d437f895f95ad0531197dcaab">channel_config_set_irq_quiet</a>(<a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *c, <span class="keywordtype">bool</span> irq_quiet) {</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno">  269</span>    c-&gt;ctrl = irq_quiet ? (c-&gt;ctrl | DMA_CH0_CTRL_TRIG_IRQ_QUIET_BITS) : (c-&gt;ctrl &amp; ~DMA_CH0_CTRL_TRIG_IRQ_QUIET_BITS);</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno">  270</span>}</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno">  271</span> </div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"><a class="line" href="group__channel__config.html#ga1acca0d1b5a1793c78dc0daec8a5fffc">  286</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__channel__config.html#ga1acca0d1b5a1793c78dc0daec8a5fffc">channel_config_set_high_priority</a>(<a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *c, <span class="keywordtype">bool</span> high_priority) {</div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno">  287</span>    c-&gt;ctrl = high_priority ? (c-&gt;ctrl | DMA_CH0_CTRL_TRIG_HIGH_PRIORITY_BITS) : (c-&gt;ctrl &amp; ~DMA_CH0_CTRL_TRIG_HIGH_PRIORITY_BITS);</div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno">  288</span>}</div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno">  289</span> </div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"><a class="line" href="group__channel__config.html#gab8f61e99408c4440866af231f947a7b9">  301</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__channel__config.html#gab8f61e99408c4440866af231f947a7b9">channel_config_set_enable</a>(<a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *c, <span class="keywordtype">bool</span> enable) {</div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno">  302</span>    c-&gt;ctrl = enable ? (c-&gt;ctrl | DMA_CH0_CTRL_TRIG_EN_BITS) : (c-&gt;ctrl &amp; ~DMA_CH0_CTRL_TRIG_EN_BITS);</div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno">  303</span>}</div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno">  304</span> </div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"><a class="line" href="group__channel__config.html#ga5eb02f42a33115052031d0b457fa2674">  313</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__channel__config.html#ga5eb02f42a33115052031d0b457fa2674">channel_config_set_sniff_enable</a>(<a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *c, <span class="keywordtype">bool</span> sniff_enable) {</div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno">  314</span>    c-&gt;ctrl = sniff_enable ? (c-&gt;ctrl | DMA_CH0_CTRL_TRIG_SNIFF_EN_BITS) : (c-&gt;ctrl &amp;</div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno">  315</span>                                                                             ~DMA_CH0_CTRL_TRIG_SNIFF_EN_BITS);</div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno">  316</span>}</div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno">  317</span> </div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"><a class="line" href="group__channel__config.html#ga432f0d010da5935d333c27fbce0135f8">  338</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> <a class="code hl_function" href="group__channel__config.html#ga432f0d010da5935d333c27fbce0135f8">dma_channel_get_default_config</a>(uint channel) {</div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno">  339</span>    <a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> c = {0};</div>
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno">  340</span>    <a class="code hl_function" href="group__channel__config.html#ga28d1103cea7f7d73406a2aee44bfebd9">channel_config_set_read_increment</a>(&amp;c, <span class="keyword">true</span>);</div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno">  341</span>    <a class="code hl_function" href="group__channel__config.html#ga864c9d35a39c315f2972b7272f860e9e">channel_config_set_write_increment</a>(&amp;c, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno">  342</span>    <a class="code hl_function" href="group__channel__config.html#ga7c5a515cf1cfc6a8889464250b1e375b">channel_config_set_dreq</a>(&amp;c, <a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014ae683f0bb3ee8b854fe4cea850cf9d4c8">DREQ_FORCE</a>);</div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno">  343</span>    <a class="code hl_function" href="group__channel__config.html#ga7df3433a59311b83289490586f1242c8">channel_config_set_chain_to</a>(&amp;c, channel);</div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno">  344</span>    <a class="code hl_function" href="group__channel__config.html#gad1a02fcee90d21f133460006b025bac0">channel_config_set_transfer_data_size</a>(&amp;c, <a class="code hl_enumvalue" href="group__hardware__dma.html#ggaccecdff367b06a019373e9a55d4f3e01abf1030013f4ad74b45d25cd9a07b6296">DMA_SIZE_32</a>);</div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno">  345</span>    <a class="code hl_function" href="group__channel__config.html#gadd7ee73f3652261ae5e195b709cc6dc0">channel_config_set_ring</a>(&amp;c, <span class="keyword">false</span>, 0);</div>
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno">  346</span>    <a class="code hl_function" href="group__channel__config.html#ga43c3a2dd43fe7e962b1de0e90a46bb9e">channel_config_set_bswap</a>(&amp;c, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno">  347</span>    <a class="code hl_function" href="group__channel__config.html#ga8ccbf80d437f895f95ad0531197dcaab">channel_config_set_irq_quiet</a>(&amp;c, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno">  348</span>    <a class="code hl_function" href="group__channel__config.html#gab8f61e99408c4440866af231f947a7b9">channel_config_set_enable</a>(&amp;c, <span class="keyword">true</span>);</div>
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno">  349</span>    <a class="code hl_function" href="group__channel__config.html#ga5eb02f42a33115052031d0b457fa2674">channel_config_set_sniff_enable</a>(&amp;c, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno">  350</span>    <a class="code hl_function" href="group__channel__config.html#ga1acca0d1b5a1793c78dc0daec8a5fffc">channel_config_set_high_priority</a>( &amp;c, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno">  351</span>    <span class="keywordflow">return</span> c;</div>
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno">  352</span>}</div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno">  353</span> </div>
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"><a class="line" href="group__channel__config.html#ga369ee3104c5a9b5a32673c163a499a1d">  360</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> <a class="code hl_function" href="group__channel__config.html#ga369ee3104c5a9b5a32673c163a499a1d">dma_get_channel_config</a>(uint channel) {</div>
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno">  361</span>    <a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> c;</div>
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno">  362</span>    c.ctrl = dma_channel_hw_addr(channel)-&gt;ctrl_trig;</div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno">  363</span>    <span class="keywordflow">return</span> c;</div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno">  364</span>}</div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno">  365</span> </div>
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"><a class="line" href="group__channel__config.html#ga7f379a63d28a2565ff9a433cb8d31c90">  372</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint32_t <a class="code hl_function" href="group__channel__config.html#ga7f379a63d28a2565ff9a433cb8d31c90">channel_config_get_ctrl_value</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *config) {</div>
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno">  373</span>    <span class="keywordflow">return</span> config-&gt;ctrl;</div>
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno">  374</span>}</div>
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno">  375</span> </div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga7449b659efb178a408f42f7f8f7b02f9">  383</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga7449b659efb178a408f42f7f8f7b02f9">dma_channel_set_config</a>(uint channel, <span class="keyword">const</span> <a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *config, <span class="keywordtype">bool</span> trigger) {</div>
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno">  384</span>    <span class="comment">// Don&#39;t use CTRL_TRIG since we don&#39;t want to start a transfer</span></div>
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno">  385</span>    <span class="keywordflow">if</span> (!trigger) {</div>
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno">  386</span>        dma_channel_hw_addr(channel)-&gt;al1_ctrl = <a class="code hl_function" href="group__channel__config.html#ga7f379a63d28a2565ff9a433cb8d31c90">channel_config_get_ctrl_value</a>(config);</div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno">  387</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno">  388</span>        dma_channel_hw_addr(channel)-&gt;ctrl_trig = <a class="code hl_function" href="group__channel__config.html#ga7f379a63d28a2565ff9a433cb8d31c90">channel_config_get_ctrl_value</a>(config);</div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno">  389</span>    }</div>
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno">  390</span>}</div>
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno">  391</span> </div>
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gabf6f6ffe56fa42dcb105032f110589ae">  399</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gabf6f6ffe56fa42dcb105032f110589ae">dma_channel_set_read_addr</a>(uint channel, <span class="keyword">const</span> <span class="keyword">volatile</span> <span class="keywordtype">void</span> *read_addr, <span class="keywordtype">bool</span> trigger) {</div>
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno">  400</span>    <span class="keywordflow">if</span> (!trigger) {</div>
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno">  401</span>        dma_channel_hw_addr(channel)-&gt;read_addr = (uintptr_t) read_addr;</div>
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno">  402</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno">  403</span>        dma_channel_hw_addr(channel)-&gt;al3_read_addr_trig = (uintptr_t) read_addr;</div>
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno">  404</span>    }</div>
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno">  405</span>}</div>
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno">  406</span> </div>
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gaf0156609fe51c07d07118b2aeb4e9ae6">  414</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gaf0156609fe51c07d07118b2aeb4e9ae6">dma_channel_set_write_addr</a>(uint channel, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *write_addr, <span class="keywordtype">bool</span> trigger) {</div>
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno">  415</span>    <span class="keywordflow">if</span> (!trigger) {</div>
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno">  416</span>        dma_channel_hw_addr(channel)-&gt;write_addr = (uintptr_t) write_addr;</div>
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno">  417</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno">  418</span>        dma_channel_hw_addr(channel)-&gt;al2_write_addr_trig = (uintptr_t) write_addr;</div>
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno">  419</span>    }</div>
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno">  420</span>}</div>
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno">  421</span> </div>
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga16c0e08eda636f13053d8c8b0f81e821">  429</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga16c0e08eda636f13053d8c8b0f81e821">dma_channel_set_trans_count</a>(uint channel, uint32_t trans_count, <span class="keywordtype">bool</span> trigger) {</div>
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno">  430</span>    <span class="keywordflow">if</span> (!trigger) {</div>
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno">  431</span>        dma_channel_hw_addr(channel)-&gt;transfer_count = trans_count;</div>
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno">  432</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno">  433</span>        dma_channel_hw_addr(channel)-&gt;al1_transfer_count_trig = trans_count;</div>
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno">  434</span>    }</div>
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno">  435</span>}</div>
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno">  436</span> </div>
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga971d077ac39b2d7f7c6b45e2ddc5d190">  447</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga971d077ac39b2d7f7c6b45e2ddc5d190">dma_channel_configure</a>(uint channel, <span class="keyword">const</span> <a class="code hl_struct" href="structdma__channel__config.html">dma_channel_config</a> *config, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *write_addr,</div>
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno">  448</span>                                         <span class="keyword">const</span> <span class="keyword">volatile</span> <span class="keywordtype">void</span> *read_addr,</div>
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno">  449</span>                                         uint transfer_count, <span class="keywordtype">bool</span> trigger) {</div>
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno">  450</span>    <a class="code hl_function" href="group__hardware__dma.html#gabf6f6ffe56fa42dcb105032f110589ae">dma_channel_set_read_addr</a>(channel, read_addr, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno">  451</span>    <a class="code hl_function" href="group__hardware__dma.html#gaf0156609fe51c07d07118b2aeb4e9ae6">dma_channel_set_write_addr</a>(channel, write_addr, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno">  452</span>    <a class="code hl_function" href="group__hardware__dma.html#ga16c0e08eda636f13053d8c8b0f81e821">dma_channel_set_trans_count</a>(channel, transfer_count, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno">  453</span>    <a class="code hl_function" href="group__hardware__dma.html#ga7449b659efb178a408f42f7f8f7b02f9">dma_channel_set_config</a>(channel, config, trigger);</div>
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno">  454</span>}</div>
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno">  455</span> </div>
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gabf64c461a405a8114591105d9dc53575">  463</a></span><span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> __attribute__((always_inline)) <a class="code hl_function" href="group__hardware__dma.html#gabf64c461a405a8114591105d9dc53575">dma_channel_transfer_from_buffer_now</a>(uint channel, </div>
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno">  464</span>                                                                                       <span class="keyword">const</span> <span class="keyword">volatile</span> <span class="keywordtype">void</span> *read_addr,</div>
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno">  465</span>                                                                                       uint32_t transfer_count) {</div>
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno">  466</span><span class="comment">//    check_dma_channel_param(channel);</span></div>
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno">  467</span>    <a class="code hl_struct" href="structdma__channel__hw__t.html">dma_channel_hw_t</a> *hw = dma_channel_hw_addr(channel);</div>
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno">  468</span>    hw-&gt;read_addr = (uintptr_t) read_addr;</div>
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno">  469</span>    hw-&gt;al1_transfer_count_trig = transfer_count;</div>
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno">  470</span>}</div>
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno">  471</span> </div>
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga9110135d8161fc268d87dfb040d0f854">  479</a></span><span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga9110135d8161fc268d87dfb040d0f854">dma_channel_transfer_to_buffer_now</a>(uint channel, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *write_addr, uint32_t transfer_count) {</div>
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno">  480</span>    <a class="code hl_struct" href="structdma__channel__hw__t.html">dma_channel_hw_t</a> *hw = dma_channel_hw_addr(channel);</div>
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno">  481</span>    hw-&gt;write_addr = (uintptr_t) write_addr;</div>
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno">  482</span>    hw-&gt;al1_transfer_count_trig = transfer_count;</div>
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno">  483</span>}</div>
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno">  484</span> </div>
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga6407f7763b533c98e23f65e35c5e48ee">  490</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga6407f7763b533c98e23f65e35c5e48ee">dma_start_channel_mask</a>(uint32_t chan_mask) {</div>
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno">  491</span>    valid_params_if(HARDWARE_DMA, chan_mask &amp;&amp; chan_mask &lt; (1u &lt;&lt; NUM_DMA_CHANNELS));</div>
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno">  492</span>    dma_hw-&gt;multi_channel_trigger = chan_mask;</div>
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno">  493</span>}</div>
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno">  494</span> </div>
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga355720e02713c7324b540efc6f632366">  500</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga355720e02713c7324b540efc6f632366">dma_channel_start</a>(uint channel) {</div>
<div class="line"><a id="l00501" name="l00501"></a><span class="lineno">  501</span>    <a class="code hl_function" href="group__hardware__dma.html#ga6407f7763b533c98e23f65e35c5e48ee">dma_start_channel_mask</a>(1u &lt;&lt; channel);</div>
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno">  502</span>}</div>
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno">  503</span> </div>
<div class="line"><a id="l00544" name="l00544"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga735e7c6c136c078689ead70790f4edb2">  544</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga735e7c6c136c078689ead70790f4edb2">dma_channel_abort</a>(uint channel) {</div>
<div class="line"><a id="l00545" name="l00545"></a><span class="lineno">  545</span>    check_dma_channel_param(channel);</div>
<div class="line"><a id="l00546" name="l00546"></a><span class="lineno">  546</span>    dma_hw-&gt;abort = 1u &lt;&lt; channel;</div>
<div class="line"><a id="l00547" name="l00547"></a><span class="lineno">  547</span>    <span class="comment">// Bit will go 0 once channel has reached safe state</span></div>
<div class="line"><a id="l00548" name="l00548"></a><span class="lineno">  548</span>    <span class="comment">// (i.e. any in-flight transfers have retired)</span></div>
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno">  549</span>    <span class="keywordflow">while</span> (dma_hw-&gt;ch[channel].ctrl_trig &amp; DMA_CH0_CTRL_TRIG_BUSY_BITS) <a class="code hl_function" href="group__pico__platform.html#gab0d1ba75ceb64131e19f613d7a5313c9">tight_loop_contents</a>();</div>
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno">  550</span>}</div>
<div class="line"><a id="l00551" name="l00551"></a><span class="lineno">  551</span> </div>
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gaf60011d46676c87b7139f37188eaa4b9">  558</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gaf60011d46676c87b7139f37188eaa4b9">dma_channel_set_irq0_enabled</a>(uint channel, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l00559" name="l00559"></a><span class="lineno">  559</span>    check_dma_channel_param(channel);</div>
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno">  560</span>    check_hw_layout(<a class="code hl_struct" href="structdma__hw__t.html">dma_hw_t</a>, inte0, DMA_INTE0_OFFSET);</div>
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno">  561</span>    <span class="keywordflow">if</span> (enabled)</div>
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno">  562</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;dma_hw-&gt;inte0, 1u &lt;&lt; channel);</div>
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno">  563</span>    <span class="keywordflow">else</span></div>
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno">  564</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;dma_hw-&gt;inte0, 1u &lt;&lt; channel);</div>
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno">  565</span>}</div>
<div class="line"><a id="l00566" name="l00566"></a><span class="lineno">  566</span> </div>
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gad5c1ac22e0b4d9b831912fbb95460be4">  573</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gad5c1ac22e0b4d9b831912fbb95460be4">dma_set_irq0_channel_mask_enabled</a>(uint32_t channel_mask, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno">  574</span>    <span class="keywordflow">if</span> (enabled) {</div>
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno">  575</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;dma_hw-&gt;inte0, channel_mask);</div>
<div class="line"><a id="l00576" name="l00576"></a><span class="lineno">  576</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno">  577</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;dma_hw-&gt;inte0, channel_mask);</div>
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno">  578</span>    }</div>
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno">  579</span>}</div>
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno">  580</span> </div>
<div class="line"><a id="l00587" name="l00587"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga4f9415c8f77ff0bacedf5a138a88d76f">  587</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga4f9415c8f77ff0bacedf5a138a88d76f">dma_channel_set_irq1_enabled</a>(uint channel, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l00588" name="l00588"></a><span class="lineno">  588</span>    check_dma_channel_param(channel);</div>
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno">  589</span>    check_hw_layout(<a class="code hl_struct" href="structdma__hw__t.html">dma_hw_t</a>, inte1, DMA_INTE1_OFFSET);</div>
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno">  590</span>    <span class="keywordflow">if</span> (enabled)</div>
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno">  591</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;dma_hw-&gt;inte1, 1u &lt;&lt; channel);</div>
<div class="line"><a id="l00592" name="l00592"></a><span class="lineno">  592</span>    <span class="keywordflow">else</span></div>
<div class="line"><a id="l00593" name="l00593"></a><span class="lineno">  593</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;dma_hw-&gt;inte1, 1u &lt;&lt; channel);</div>
<div class="line"><a id="l00594" name="l00594"></a><span class="lineno">  594</span>}</div>
<div class="line"><a id="l00595" name="l00595"></a><span class="lineno">  595</span> </div>
<div class="line"><a id="l00602" name="l00602"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gaaa20edc55a2cc4977d24bdb487a22aa5">  602</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gaaa20edc55a2cc4977d24bdb487a22aa5">dma_set_irq1_channel_mask_enabled</a>(uint32_t channel_mask, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l00603" name="l00603"></a><span class="lineno">  603</span>    <span class="keywordflow">if</span> (enabled) {</div>
<div class="line"><a id="l00604" name="l00604"></a><span class="lineno">  604</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;dma_hw-&gt;inte1, channel_mask);</div>
<div class="line"><a id="l00605" name="l00605"></a><span class="lineno">  605</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00606" name="l00606"></a><span class="lineno">  606</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;dma_hw-&gt;inte1, channel_mask);</div>
<div class="line"><a id="l00607" name="l00607"></a><span class="lineno">  607</span>    }</div>
<div class="line"><a id="l00608" name="l00608"></a><span class="lineno">  608</span>}</div>
<div class="line"><a id="l00609" name="l00609"></a><span class="lineno">  609</span> </div>
<div class="line"><a id="l00617" name="l00617"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga6fefe19fa5539580315de923e42131d3">  617</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga6fefe19fa5539580315de923e42131d3">dma_irqn_set_channel_enabled</a>(uint irq_index, uint channel, <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l00618" name="l00618"></a><span class="lineno">  618</span>    invalid_params_if(HARDWARE_DMA, irq_index &gt;= NUM_DMA_IRQS);</div>
<div class="line"><a id="l00619" name="l00619"></a><span class="lineno">  619</span> </div>
<div class="line"><a id="l00620" name="l00620"></a><span class="lineno">  620</span>    <span class="keywordflow">if</span> (enabled)</div>
<div class="line"><a id="l00621" name="l00621"></a><span class="lineno">  621</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;dma_hw-&gt;irq_ctrl[irq_index].inte, 1u &lt;&lt; channel);</div>
<div class="line"><a id="l00622" name="l00622"></a><span class="lineno">  622</span>    <span class="keywordflow">else</span></div>
<div class="line"><a id="l00623" name="l00623"></a><span class="lineno">  623</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;dma_hw-&gt;irq_ctrl[irq_index].inte, 1u &lt;&lt; channel);</div>
<div class="line"><a id="l00624" name="l00624"></a><span class="lineno">  624</span>}</div>
<div class="line"><a id="l00625" name="l00625"></a><span class="lineno">  625</span> </div>
<div class="line"><a id="l00633" name="l00633"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga720f2335e93b0e53e28959566ca18f3e">  633</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga720f2335e93b0e53e28959566ca18f3e">dma_irqn_set_channel_mask_enabled</a>(uint irq_index, uint32_t channel_mask,  <span class="keywordtype">bool</span> enabled) {</div>
<div class="line"><a id="l00634" name="l00634"></a><span class="lineno">  634</span>    invalid_params_if(HARDWARE_DMA, irq_index &gt;= NUM_DMA_IRQS);</div>
<div class="line"><a id="l00635" name="l00635"></a><span class="lineno">  635</span>    <span class="keywordflow">if</span> (enabled) {</div>
<div class="line"><a id="l00636" name="l00636"></a><span class="lineno">  636</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;dma_hw-&gt;irq_ctrl[irq_index].inte, channel_mask);</div>
<div class="line"><a id="l00637" name="l00637"></a><span class="lineno">  637</span>    } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00638" name="l00638"></a><span class="lineno">  638</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;dma_hw-&gt;irq_ctrl[irq_index].inte, channel_mask);</div>
<div class="line"><a id="l00639" name="l00639"></a><span class="lineno">  639</span>    }</div>
<div class="line"><a id="l00640" name="l00640"></a><span class="lineno">  640</span>}</div>
<div class="line"><a id="l00641" name="l00641"></a><span class="lineno">  641</span> </div>
<div class="line"><a id="l00648" name="l00648"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gaa86e892c47b054d3c22fa39c001c7c23">  648</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__dma.html#gaa86e892c47b054d3c22fa39c001c7c23">dma_channel_get_irq0_status</a>(uint channel) {</div>
<div class="line"><a id="l00649" name="l00649"></a><span class="lineno">  649</span>    check_dma_channel_param(channel);</div>
<div class="line"><a id="l00650" name="l00650"></a><span class="lineno">  650</span>    <span class="keywordflow">return</span> dma_hw-&gt;ints0 &amp; (1u &lt;&lt; channel);</div>
<div class="line"><a id="l00651" name="l00651"></a><span class="lineno">  651</span>}</div>
<div class="line"><a id="l00652" name="l00652"></a><span class="lineno">  652</span> </div>
<div class="line"><a id="l00659" name="l00659"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gaf61d25264e49058d20fb607dc1c40981">  659</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__dma.html#gaf61d25264e49058d20fb607dc1c40981">dma_channel_get_irq1_status</a>(uint channel) {</div>
<div class="line"><a id="l00660" name="l00660"></a><span class="lineno">  660</span>    check_dma_channel_param(channel);</div>
<div class="line"><a id="l00661" name="l00661"></a><span class="lineno">  661</span>    <span class="keywordflow">return</span> dma_hw-&gt;ints1 &amp; (1u &lt;&lt; channel);</div>
<div class="line"><a id="l00662" name="l00662"></a><span class="lineno">  662</span>}</div>
<div class="line"><a id="l00663" name="l00663"></a><span class="lineno">  663</span> </div>
<div class="line"><a id="l00671" name="l00671"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga43f1fe10d5eb241788f72ad11599fc11">  671</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__dma.html#ga43f1fe10d5eb241788f72ad11599fc11">dma_irqn_get_channel_status</a>(uint irq_index, uint channel) {</div>
<div class="line"><a id="l00672" name="l00672"></a><span class="lineno">  672</span>    invalid_params_if(HARDWARE_DMA, irq_index &gt;= NUM_DMA_IRQS);</div>
<div class="line"><a id="l00673" name="l00673"></a><span class="lineno">  673</span>    check_dma_channel_param(channel);</div>
<div class="line"><a id="l00674" name="l00674"></a><span class="lineno">  674</span>    <span class="keywordflow">return</span> dma_hw-&gt;irq_ctrl[irq_index].ints &amp; (1u &lt;&lt; channel);</div>
<div class="line"><a id="l00675" name="l00675"></a><span class="lineno">  675</span>}</div>
<div class="line"><a id="l00676" name="l00676"></a><span class="lineno">  676</span> </div>
<div class="line"><a id="l00682" name="l00682"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gafefe50f20c44bcfa7f729829a5d494f4">  682</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gafefe50f20c44bcfa7f729829a5d494f4">dma_channel_acknowledge_irq0</a>(uint channel) {</div>
<div class="line"><a id="l00683" name="l00683"></a><span class="lineno">  683</span>    check_dma_channel_param(channel);</div>
<div class="line"><a id="l00684" name="l00684"></a><span class="lineno">  684</span>    dma_hw-&gt;ints0 = 1u &lt;&lt; channel;</div>
<div class="line"><a id="l00685" name="l00685"></a><span class="lineno">  685</span>}</div>
<div class="line"><a id="l00686" name="l00686"></a><span class="lineno">  686</span> </div>
<div class="line"><a id="l00692" name="l00692"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga4d4b5d461ff09bb6e4e2a05df3b7c75c">  692</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga4d4b5d461ff09bb6e4e2a05df3b7c75c">dma_channel_acknowledge_irq1</a>(uint channel) {</div>
<div class="line"><a id="l00693" name="l00693"></a><span class="lineno">  693</span>    check_dma_channel_param(channel);</div>
<div class="line"><a id="l00694" name="l00694"></a><span class="lineno">  694</span>    dma_hw-&gt;ints1 = 1u &lt;&lt; channel;</div>
<div class="line"><a id="l00695" name="l00695"></a><span class="lineno">  695</span>}</div>
<div class="line"><a id="l00696" name="l00696"></a><span class="lineno">  696</span> </div>
<div class="line"><a id="l00703" name="l00703"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gad0e8e022fbe67b80c16912254526fada">  703</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gad0e8e022fbe67b80c16912254526fada">dma_irqn_acknowledge_channel</a>(uint irq_index, uint channel) {</div>
<div class="line"><a id="l00704" name="l00704"></a><span class="lineno">  704</span>    invalid_params_if(HARDWARE_DMA, irq_index &gt;= NUM_DMA_IRQS);</div>
<div class="line"><a id="l00705" name="l00705"></a><span class="lineno">  705</span>    check_dma_channel_param(channel);</div>
<div class="line"><a id="l00706" name="l00706"></a><span class="lineno">  706</span>    dma_hw-&gt;irq_ctrl[irq_index].ints = 1u &lt;&lt; channel;</div>
<div class="line"><a id="l00707" name="l00707"></a><span class="lineno">  707</span>}</div>
<div class="line"><a id="l00708" name="l00708"></a><span class="lineno">  708</span> </div>
<div class="line"><a id="l00715" name="l00715"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gafbb5020a529ed6d39a11da88a6f313f2">  715</a></span><span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__dma.html#gafbb5020a529ed6d39a11da88a6f313f2">dma_channel_is_busy</a>(uint channel) {</div>
<div class="line"><a id="l00716" name="l00716"></a><span class="lineno">  716</span>    check_dma_channel_param(channel);</div>
<div class="line"><a id="l00717" name="l00717"></a><span class="lineno">  717</span>    <span class="keywordflow">return</span> dma_hw-&gt;ch[channel].al1_ctrl &amp; DMA_CH0_CTRL_TRIG_BUSY_BITS;</div>
<div class="line"><a id="l00718" name="l00718"></a><span class="lineno">  718</span>}</div>
<div class="line"><a id="l00719" name="l00719"></a><span class="lineno">  719</span> </div>
<div class="line"><a id="l00725" name="l00725"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gab57c68850b8e6ed1623de75ad611db62">  725</a></span><span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gab57c68850b8e6ed1623de75ad611db62">dma_channel_wait_for_finish_blocking</a>(uint channel) {</div>
<div class="line"><a id="l00726" name="l00726"></a><span class="lineno">  726</span>    <span class="keywordflow">while</span> (<a class="code hl_function" href="group__hardware__dma.html#gafbb5020a529ed6d39a11da88a6f313f2">dma_channel_is_busy</a>(channel)) <a class="code hl_function" href="group__pico__platform.html#gab0d1ba75ceb64131e19f613d7a5313c9">tight_loop_contents</a>();</div>
<div class="line"><a id="l00727" name="l00727"></a><span class="lineno">  727</span>    <span class="comment">// stop the compiler hoisting a non-volatile buffer access above the DMA completion.</span></div>
<div class="line"><a id="l00728" name="l00728"></a><span class="lineno">  728</span>    <a class="code hl_function" href="group__pico__platform.html#gac01ec0ae597f7572f8e298fa4f48c8e6">__compiler_memory_barrier</a>();</div>
<div class="line"><a id="l00729" name="l00729"></a><span class="lineno">  729</span>}</div>
<div class="line"><a id="l00730" name="l00730"></a><span class="lineno">  730</span> </div>
<div class="line"><a id="l00751" name="l00751"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga078c3c80d5637850ec64e8f5ad5ce0c2">  751</a></span><span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga078c3c80d5637850ec64e8f5ad5ce0c2">dma_sniffer_enable</a>(uint channel, uint mode, <span class="keywordtype">bool</span> force_channel_enable) {</div>
<div class="line"><a id="l00752" name="l00752"></a><span class="lineno">  752</span>    check_dma_channel_param(channel);</div>
<div class="line"><a id="l00753" name="l00753"></a><span class="lineno">  753</span>    check_hw_layout(<a class="code hl_struct" href="structdma__hw__t.html">dma_hw_t</a>, sniff_ctrl, DMA_SNIFF_CTRL_OFFSET);</div>
<div class="line"><a id="l00754" name="l00754"></a><span class="lineno">  754</span>    <span class="keywordflow">if</span> (force_channel_enable) {</div>
<div class="line"><a id="l00755" name="l00755"></a><span class="lineno">  755</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;dma_hw-&gt;ch[channel].al1_ctrl, DMA_CH0_CTRL_TRIG_SNIFF_EN_BITS);</div>
<div class="line"><a id="l00756" name="l00756"></a><span class="lineno">  756</span>    }</div>
<div class="line"><a id="l00757" name="l00757"></a><span class="lineno">  757</span>    <a class="code hl_function" href="group__hardware__base.html#ga81b27e30abef56fe090d22fd8dfdbcc1">hw_write_masked</a>(&amp;dma_hw-&gt;sniff_ctrl,</div>
<div class="line"><a id="l00758" name="l00758"></a><span class="lineno">  758</span>        (((channel &lt;&lt; DMA_SNIFF_CTRL_DMACH_LSB) &amp; DMA_SNIFF_CTRL_DMACH_BITS) |</div>
<div class="line"><a id="l00759" name="l00759"></a><span class="lineno">  759</span>         ((mode &lt;&lt; DMA_SNIFF_CTRL_CALC_LSB) &amp; DMA_SNIFF_CTRL_CALC_BITS) |</div>
<div class="line"><a id="l00760" name="l00760"></a><span class="lineno">  760</span>         DMA_SNIFF_CTRL_EN_BITS),</div>
<div class="line"><a id="l00761" name="l00761"></a><span class="lineno">  761</span>        (DMA_SNIFF_CTRL_DMACH_BITS |</div>
<div class="line"><a id="l00762" name="l00762"></a><span class="lineno">  762</span>         DMA_SNIFF_CTRL_CALC_BITS |</div>
<div class="line"><a id="l00763" name="l00763"></a><span class="lineno">  763</span>         DMA_SNIFF_CTRL_EN_BITS));</div>
<div class="line"><a id="l00764" name="l00764"></a><span class="lineno">  764</span>}</div>
<div class="line"><a id="l00765" name="l00765"></a><span class="lineno">  765</span> </div>
<div class="line"><a id="l00777" name="l00777"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gac3b250d97550527a584de9d3f770acea">  777</a></span><span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gac3b250d97550527a584de9d3f770acea">dma_sniffer_set_byte_swap_enabled</a>(<span class="keywordtype">bool</span> swap) {</div>
<div class="line"><a id="l00778" name="l00778"></a><span class="lineno">  778</span>    <span class="keywordflow">if</span> (swap)</div>
<div class="line"><a id="l00779" name="l00779"></a><span class="lineno">  779</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;dma_hw-&gt;sniff_ctrl, DMA_SNIFF_CTRL_BSWAP_BITS);</div>
<div class="line"><a id="l00780" name="l00780"></a><span class="lineno">  780</span>    <span class="keywordflow">else</span></div>
<div class="line"><a id="l00781" name="l00781"></a><span class="lineno">  781</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;dma_hw-&gt;sniff_ctrl, DMA_SNIFF_CTRL_BSWAP_BITS);</div>
<div class="line"><a id="l00782" name="l00782"></a><span class="lineno">  782</span>}</div>
<div class="line"><a id="l00783" name="l00783"></a><span class="lineno">  783</span> </div>
<div class="line"><a id="l00792" name="l00792"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga1366c938a8322aa1eb8e703b1f22d6af">  792</a></span><span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga1366c938a8322aa1eb8e703b1f22d6af">dma_sniffer_set_output_invert_enabled</a>(<span class="keywordtype">bool</span> invert) {</div>
<div class="line"><a id="l00793" name="l00793"></a><span class="lineno">  793</span>    <span class="keywordflow">if</span> (invert)</div>
<div class="line"><a id="l00794" name="l00794"></a><span class="lineno">  794</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;dma_hw-&gt;sniff_ctrl, DMA_SNIFF_CTRL_OUT_INV_BITS);</div>
<div class="line"><a id="l00795" name="l00795"></a><span class="lineno">  795</span>    <span class="keywordflow">else</span></div>
<div class="line"><a id="l00796" name="l00796"></a><span class="lineno">  796</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;dma_hw-&gt;sniff_ctrl, DMA_SNIFF_CTRL_OUT_INV_BITS);</div>
<div class="line"><a id="l00797" name="l00797"></a><span class="lineno">  797</span>}</div>
<div class="line"><a id="l00798" name="l00798"></a><span class="lineno">  798</span> </div>
<div class="line"><a id="l00807" name="l00807"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gaa2c5775bdb86d63a4866b2f6f5b41143">  807</a></span><span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gaa2c5775bdb86d63a4866b2f6f5b41143">dma_sniffer_set_output_reverse_enabled</a>(<span class="keywordtype">bool</span> reverse) {</div>
<div class="line"><a id="l00808" name="l00808"></a><span class="lineno">  808</span>    <span class="keywordflow">if</span> (reverse)</div>
<div class="line"><a id="l00809" name="l00809"></a><span class="lineno">  809</span>        <a class="code hl_function" href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a>(&amp;dma_hw-&gt;sniff_ctrl, DMA_SNIFF_CTRL_OUT_REV_BITS);</div>
<div class="line"><a id="l00810" name="l00810"></a><span class="lineno">  810</span>    <span class="keywordflow">else</span></div>
<div class="line"><a id="l00811" name="l00811"></a><span class="lineno">  811</span>        <a class="code hl_function" href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a>(&amp;dma_hw-&gt;sniff_ctrl, DMA_SNIFF_CTRL_OUT_REV_BITS);</div>
<div class="line"><a id="l00812" name="l00812"></a><span class="lineno">  812</span>}</div>
<div class="line"><a id="l00813" name="l00813"></a><span class="lineno">  813</span> </div>
<div class="line"><a id="l00818" name="l00818"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga9c9bcbe60b4c6102cae3e616476c4735">  818</a></span><span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga9c9bcbe60b4c6102cae3e616476c4735">dma_sniffer_disable</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a id="l00819" name="l00819"></a><span class="lineno">  819</span>    dma_hw-&gt;sniff_ctrl = 0;</div>
<div class="line"><a id="l00820" name="l00820"></a><span class="lineno">  820</span>}</div>
<div class="line"><a id="l00821" name="l00821"></a><span class="lineno">  821</span> </div>
<div class="line"><a id="l00830" name="l00830"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#gacab1f8010c206dfc77b81cb16902a4e4">  830</a></span><span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#gacab1f8010c206dfc77b81cb16902a4e4">dma_sniffer_set_data_accumulator</a>(uint32_t seed_value) {</div>
<div class="line"><a id="l00831" name="l00831"></a><span class="lineno">  831</span>    dma_hw-&gt;sniff_data = seed_value;</div>
<div class="line"><a id="l00832" name="l00832"></a><span class="lineno">  832</span>}</div>
<div class="line"><a id="l00833" name="l00833"></a><span class="lineno">  833</span> </div>
<div class="line"><a id="l00839" name="l00839"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga3527c2567c9253ca602b91d30ae49d1e">  839</a></span><span class="keyword">inline</span> <span class="keyword">static</span> uint32_t <a class="code hl_function" href="group__hardware__dma.html#ga3527c2567c9253ca602b91d30ae49d1e">dma_sniffer_get_data_accumulator</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a id="l00840" name="l00840"></a><span class="lineno">  840</span>    <span class="keywordflow">return</span> dma_hw-&gt;sniff_data;</div>
<div class="line"><a id="l00841" name="l00841"></a><span class="lineno">  841</span>}</div>
<div class="line"><a id="l00842" name="l00842"></a><span class="lineno">  842</span> </div>
<div class="line"><a id="l00852" name="l00852"></a><span class="lineno">  852</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga08fc90c0064510e7a0a2cf8d1cd187bc">dma_timer_claim</a>(uint timer);</div>
<div class="line"><a id="l00853" name="l00853"></a><span class="lineno">  853</span> </div>
<div class="line"><a id="l00861" name="l00861"></a><span class="lineno">  861</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga890490576d8806b8933aad0e34d09c5e">dma_timer_unclaim</a>(uint timer);</div>
<div class="line"><a id="l00862" name="l00862"></a><span class="lineno">  862</span> </div>
<div class="line"><a id="l00869" name="l00869"></a><span class="lineno">  869</span><span class="keywordtype">int</span> <a class="code hl_function" href="group__hardware__dma.html#ga2f218b6acd97e09430afbb74172bd570">dma_claim_unused_timer</a>(<span class="keywordtype">bool</span> required);</div>
<div class="line"><a id="l00870" name="l00870"></a><span class="lineno">  870</span> </div>
<div class="line"><a id="l00878" name="l00878"></a><span class="lineno">  878</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__dma.html#ga9b45bfe6985f8c0894d34876eedc3090">dma_timer_is_claimed</a>(uint timer);</div>
<div class="line"><a id="l00879" name="l00879"></a><span class="lineno">  879</span> </div>
<div class="line"><a id="l00891" name="l00891"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga58f9c3cb606759e4620c82583f833dc8">  891</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga58f9c3cb606759e4620c82583f833dc8">dma_timer_set_fraction</a>(uint timer, uint16_t numerator, uint16_t denominator) {</div>
<div class="line"><a id="l00892" name="l00892"></a><span class="lineno">  892</span>    check_dma_timer_param(timer);</div>
<div class="line"><a id="l00893" name="l00893"></a><span class="lineno">  893</span>    invalid_params_if(HARDWARE_DMA, numerator &gt; denominator);</div>
<div class="line"><a id="l00894" name="l00894"></a><span class="lineno">  894</span>    dma_hw-&gt;timer[timer] = (((uint32_t)numerator) &lt;&lt; DMA_TIMER0_X_LSB) | (((uint32_t)denominator) &lt;&lt; DMA_TIMER0_Y_LSB);</div>
<div class="line"><a id="l00895" name="l00895"></a><span class="lineno">  895</span>}</div>
<div class="line"><a id="l00896" name="l00896"></a><span class="lineno">  896</span> </div>
<div class="line"><a id="l00902" name="l00902"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga75ef6881795fd1760fe813f9e0a79223">  902</a></span><span class="keyword">static</span> <span class="keyword">inline</span> uint <a class="code hl_function" href="group__hardware__dma.html#ga75ef6881795fd1760fe813f9e0a79223">dma_get_timer_dreq</a>(uint timer_num) {</div>
<div class="line"><a id="l00903" name="l00903"></a><span class="lineno">  903</span>    <span class="keyword">static_assert</span>(<a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a11c9291490c2ddf45df69f45a2f83dcf">DREQ_DMA_TIMER1</a> == <a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a49bb6d90479edbff257068afd1a5bfe1">DREQ_DMA_TIMER0</a> + 1, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00904" name="l00904"></a><span class="lineno">  904</span>    <span class="keyword">static_assert</span>(<a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014abb60a9d9038192f9db081b51b9c23f65">DREQ_DMA_TIMER2</a> == <a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a49bb6d90479edbff257068afd1a5bfe1">DREQ_DMA_TIMER0</a> + 2, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00905" name="l00905"></a><span class="lineno">  905</span>    <span class="keyword">static_assert</span>(<a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a86d08425822a129c3eaa1479e920c67c">DREQ_DMA_TIMER3</a> == <a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a49bb6d90479edbff257068afd1a5bfe1">DREQ_DMA_TIMER0</a> + 3, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a id="l00906" name="l00906"></a><span class="lineno">  906</span>    check_dma_timer_param(timer_num);</div>
<div class="line"><a id="l00907" name="l00907"></a><span class="lineno">  907</span>    <span class="keywordflow">return</span> <a class="code hl_enumvalue" href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a49bb6d90479edbff257068afd1a5bfe1">DREQ_DMA_TIMER0</a> + timer_num;</div>
<div class="line"><a id="l00908" name="l00908"></a><span class="lineno">  908</span>}</div>
<div class="line"><a id="l00909" name="l00909"></a><span class="lineno">  909</span> </div>
<div class="line"><a id="l00916" name="l00916"></a><span class="lineno"><a class="line" href="group__hardware__dma.html#ga5da1507764272564a75939e2cf38fa9a">  916</a></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code hl_function" href="group__hardware__dma.html#ga5da1507764272564a75939e2cf38fa9a">dma_get_irq_num</a>(uint irq_index) {</div>
<div class="line"><a id="l00917" name="l00917"></a><span class="lineno">  917</span>    valid_params_if(HARDWARE_DMA, irq_index &lt; NUM_DMA_IRQS);</div>
<div class="line"><a id="l00918" name="l00918"></a><span class="lineno">  918</span>    <span class="keywordflow">return</span> <a class="code hl_define" href="group__hardware__dma.html#ga6c72cc3aafb409371f60fefd0463e289">DMA_IRQ_NUM</a>(irq_index);</div>
<div class="line"><a id="l00919" name="l00919"></a><span class="lineno">  919</span>}</div>
<div class="line"><a id="l00920" name="l00920"></a><span class="lineno">  920</span> </div>
<div class="line"><a id="l00938" name="l00938"></a><span class="lineno">  938</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__dma.html#ga655130988c1045bdf711135698adf321">dma_channel_cleanup</a>(uint channel);</div>
<div class="line"><a id="l00939" name="l00939"></a><span class="lineno">  939</span> </div>
<div class="line"><a id="l00940" name="l00940"></a><span class="lineno">  940</span><span class="preprocessor">#ifndef NDEBUG</span></div>
<div class="line"><a id="l00941" name="l00941"></a><span class="lineno">  941</span><span class="keywordtype">void</span> print_dma_ctrl(<a class="code hl_struct" href="structdma__channel__hw__t.html">dma_channel_hw_t</a> *channel);</div>
<div class="line"><a id="l00942" name="l00942"></a><span class="lineno">  942</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00943" name="l00943"></a><span class="lineno">  943</span> </div>
<div class="line"><a id="l00944" name="l00944"></a><span class="lineno">  944</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00945" name="l00945"></a><span class="lineno">  945</span>}</div>
<div class="line"><a id="l00946" name="l00946"></a><span class="lineno">  946</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00947" name="l00947"></a><span class="lineno">  947</span> </div>
<div class="line"><a id="l00948" name="l00948"></a><span class="lineno">  948</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="agroup__channel__config_html_ga1acca0d1b5a1793c78dc0daec8a5fffc"><div class="ttname"><a href="group__channel__config.html#ga1acca0d1b5a1793c78dc0daec8a5fffc">channel_config_set_high_priority</a></div><div class="ttdeci">static void channel_config_set_high_priority(dma_channel_config *c, bool high_priority)</div><div class="ttdoc">Set the channel priority in a channel configuration object.</div><div class="ttdef"><b>Definition:</b> dma.h:286</div></div>
<div class="ttc" id="agroup__channel__config_html_ga28d1103cea7f7d73406a2aee44bfebd9"><div class="ttname"><a href="group__channel__config.html#ga28d1103cea7f7d73406a2aee44bfebd9">channel_config_set_read_increment</a></div><div class="ttdeci">static void channel_config_set_read_increment(dma_channel_config *c, bool incr)</div><div class="ttdoc">Set DMA channel read increment in a channel configuration object.</div><div class="ttdef"><b>Definition:</b> dma.h:160</div></div>
<div class="ttc" id="agroup__channel__config_html_ga369ee3104c5a9b5a32673c163a499a1d"><div class="ttname"><a href="group__channel__config.html#ga369ee3104c5a9b5a32673c163a499a1d">dma_get_channel_config</a></div><div class="ttdeci">static dma_channel_config dma_get_channel_config(uint channel)</div><div class="ttdoc">Get the current configuration for the specified channel.</div><div class="ttdef"><b>Definition:</b> dma.h:360</div></div>
<div class="ttc" id="agroup__channel__config_html_ga432f0d010da5935d333c27fbce0135f8"><div class="ttname"><a href="group__channel__config.html#ga432f0d010da5935d333c27fbce0135f8">dma_channel_get_default_config</a></div><div class="ttdeci">static dma_channel_config dma_channel_get_default_config(uint channel)</div><div class="ttdoc">Get the default channel configuration for a given channel.</div><div class="ttdef"><b>Definition:</b> dma.h:338</div></div>
<div class="ttc" id="agroup__channel__config_html_ga43c3a2dd43fe7e962b1de0e90a46bb9e"><div class="ttname"><a href="group__channel__config.html#ga43c3a2dd43fe7e962b1de0e90a46bb9e">channel_config_set_bswap</a></div><div class="ttdeci">static void channel_config_set_bswap(dma_channel_config *c, bool bswap)</div><div class="ttdoc">Set DMA byte swapping config in a channel configuration object.</div><div class="ttdef"><b>Definition:</b> dma.h:254</div></div>
<div class="ttc" id="agroup__channel__config_html_ga5eb02f42a33115052031d0b457fa2674"><div class="ttname"><a href="group__channel__config.html#ga5eb02f42a33115052031d0b457fa2674">channel_config_set_sniff_enable</a></div><div class="ttdeci">static void channel_config_set_sniff_enable(dma_channel_config *c, bool sniff_enable)</div><div class="ttdoc">Enable access to channel by sniff hardware in a channel configuration object.</div><div class="ttdef"><b>Definition:</b> dma.h:313</div></div>
<div class="ttc" id="agroup__channel__config_html_ga7c5a515cf1cfc6a8889464250b1e375b"><div class="ttname"><a href="group__channel__config.html#ga7c5a515cf1cfc6a8889464250b1e375b">channel_config_set_dreq</a></div><div class="ttdeci">static void channel_config_set_dreq(dma_channel_config *c, uint dreq)</div><div class="ttdoc">Select a transfer request signal in a channel configuration object.</div><div class="ttdef"><b>Definition:</b> dma.h:190</div></div>
<div class="ttc" id="agroup__channel__config_html_ga7df3433a59311b83289490586f1242c8"><div class="ttname"><a href="group__channel__config.html#ga7df3433a59311b83289490586f1242c8">channel_config_set_chain_to</a></div><div class="ttdeci">static void channel_config_set_chain_to(dma_channel_config *c, uint chain_to)</div><div class="ttdoc">Set DMA channel chain_to channel in a channel configuration object.</div><div class="ttdef"><b>Definition:</b> dma.h:204</div></div>
<div class="ttc" id="agroup__channel__config_html_ga7f379a63d28a2565ff9a433cb8d31c90"><div class="ttname"><a href="group__channel__config.html#ga7f379a63d28a2565ff9a433cb8d31c90">channel_config_get_ctrl_value</a></div><div class="ttdeci">static uint32_t channel_config_get_ctrl_value(const dma_channel_config *config)</div><div class="ttdoc">Get the raw configuration register from a channel configuration.</div><div class="ttdef"><b>Definition:</b> dma.h:372</div></div>
<div class="ttc" id="agroup__channel__config_html_ga864c9d35a39c315f2972b7272f860e9e"><div class="ttname"><a href="group__channel__config.html#ga864c9d35a39c315f2972b7272f860e9e">channel_config_set_write_increment</a></div><div class="ttdeci">static void channel_config_set_write_increment(dma_channel_config *c, bool incr)</div><div class="ttdoc">Set DMA channel write increment in a channel configuration object.</div><div class="ttdef"><b>Definition:</b> dma.h:171</div></div>
<div class="ttc" id="agroup__channel__config_html_ga8ccbf80d437f895f95ad0531197dcaab"><div class="ttname"><a href="group__channel__config.html#ga8ccbf80d437f895f95ad0531197dcaab">channel_config_set_irq_quiet</a></div><div class="ttdeci">static void channel_config_set_irq_quiet(dma_channel_config *c, bool irq_quiet)</div><div class="ttdoc">Set IRQ quiet mode in a channel configuration object.</div><div class="ttdef"><b>Definition:</b> dma.h:268</div></div>
<div class="ttc" id="agroup__channel__config_html_gab8f61e99408c4440866af231f947a7b9"><div class="ttname"><a href="group__channel__config.html#gab8f61e99408c4440866af231f947a7b9">channel_config_set_enable</a></div><div class="ttdeci">static void channel_config_set_enable(dma_channel_config *c, bool enable)</div><div class="ttdoc">Enable/Disable the DMA channel in a channel configuration object.</div><div class="ttdef"><b>Definition:</b> dma.h:301</div></div>
<div class="ttc" id="agroup__channel__config_html_gad1a02fcee90d21f133460006b025bac0"><div class="ttname"><a href="group__channel__config.html#gad1a02fcee90d21f133460006b025bac0">channel_config_set_transfer_data_size</a></div><div class="ttdeci">static void channel_config_set_transfer_data_size(dma_channel_config *c, enum dma_channel_transfer_size size)</div><div class="ttdoc">Set the size of each DMA bus transfer in a channel configuration object.</div><div class="ttdef"><b>Definition:</b> dma.h:218</div></div>
<div class="ttc" id="agroup__channel__config_html_gadd7ee73f3652261ae5e195b709cc6dc0"><div class="ttname"><a href="group__channel__config.html#gadd7ee73f3652261ae5e195b709cc6dc0">channel_config_set_ring</a></div><div class="ttdeci">static void channel_config_set_ring(dma_channel_config *c, bool write, uint size_bits)</div><div class="ttdoc">Set address wrapping parameters in a channel configuration object.</div><div class="ttdef"><b>Definition:</b> dma.h:238</div></div>
<div class="ttc" id="agroup__hardware__base_html_ga625e737a57f12211cf1f634ca5095ae4"><div class="ttname"><a href="group__hardware__base.html#ga625e737a57f12211cf1f634ca5095ae4">hw_set_bits</a></div><div class="ttdeci">static __force_inline void hw_set_bits(io_rw_32 *addr, uint32_t mask)</div><div class="ttdoc">Atomically set the specified bits to 1 in a HW register.</div><div class="ttdef"><b>Definition:</b> address_mapped.h:135</div></div>
<div class="ttc" id="agroup__hardware__base_html_ga81b27e30abef56fe090d22fd8dfdbcc1"><div class="ttname"><a href="group__hardware__base.html#ga81b27e30abef56fe090d22fd8dfdbcc1">hw_write_masked</a></div><div class="ttdeci">static __force_inline void hw_write_masked(io_rw_32 *addr, uint32_t values, uint32_t write_mask)</div><div class="ttdoc">Set new values for a sub-set of the bits in a HW register.</div><div class="ttdef"><b>Definition:</b> address_mapped.h:171</div></div>
<div class="ttc" id="agroup__hardware__base_html_gafd1c089df868d987daf95870b501c2ed"><div class="ttname"><a href="group__hardware__base.html#gafd1c089df868d987daf95870b501c2ed">hw_clear_bits</a></div><div class="ttdeci">static __force_inline void hw_clear_bits(io_rw_32 *addr, uint32_t mask)</div><div class="ttdoc">Atomically clear the specified bits to 0 in a HW register.</div><div class="ttdef"><b>Definition:</b> address_mapped.h:145</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga0211681c906ebe4971d0cded8e98f8b5"><div class="ttname"><a href="group__hardware__dma.html#ga0211681c906ebe4971d0cded8e98f8b5">dma_unclaim_mask</a></div><div class="ttdeci">void dma_unclaim_mask(uint32_t channel_mask)</div><div class="ttdoc">Mark multiple dma channels as no longer used.</div><div class="ttdef"><b>Definition:</b> dma.c:39</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga078c3c80d5637850ec64e8f5ad5ce0c2"><div class="ttname"><a href="group__hardware__dma.html#ga078c3c80d5637850ec64e8f5ad5ce0c2">dma_sniffer_enable</a></div><div class="ttdeci">static void dma_sniffer_enable(uint channel, uint mode, bool force_channel_enable)</div><div class="ttdoc">Enable the DMA sniffing targeting the specified channel.</div><div class="ttdef"><b>Definition:</b> dma.h:751</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga08fc90c0064510e7a0a2cf8d1cd187bc"><div class="ttname"><a href="group__hardware__dma.html#ga08fc90c0064510e7a0a2cf8d1cd187bc">dma_timer_claim</a></div><div class="ttdeci">void dma_timer_claim(uint timer)</div><div class="ttdoc">Mark a dma timer as used.</div><div class="ttdef"><b>Definition:</b> dma.c:54</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga1366c938a8322aa1eb8e703b1f22d6af"><div class="ttname"><a href="group__hardware__dma.html#ga1366c938a8322aa1eb8e703b1f22d6af">dma_sniffer_set_output_invert_enabled</a></div><div class="ttdeci">static void dma_sniffer_set_output_invert_enabled(bool invert)</div><div class="ttdoc">Enable the Sniffer output invert function.</div><div class="ttdef"><b>Definition:</b> dma.h:792</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga16c0e08eda636f13053d8c8b0f81e821"><div class="ttname"><a href="group__hardware__dma.html#ga16c0e08eda636f13053d8c8b0f81e821">dma_channel_set_trans_count</a></div><div class="ttdeci">static void dma_channel_set_trans_count(uint channel, uint32_t trans_count, bool trigger)</div><div class="ttdoc">Set the number of bus transfers the channel will do.</div><div class="ttdef"><b>Definition:</b> dma.h:429</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga2f218b6acd97e09430afbb74172bd570"><div class="ttname"><a href="group__hardware__dma.html#ga2f218b6acd97e09430afbb74172bd570">dma_claim_unused_timer</a></div><div class="ttdeci">int dma_claim_unused_timer(bool required)</div><div class="ttdoc">Claim a free dma timer.</div><div class="ttdef"><b>Definition:</b> dma.c:64</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga3527c2567c9253ca602b91d30ae49d1e"><div class="ttname"><a href="group__hardware__dma.html#ga3527c2567c9253ca602b91d30ae49d1e">dma_sniffer_get_data_accumulator</a></div><div class="ttdeci">static uint32_t dma_sniffer_get_data_accumulator(void)</div><div class="ttdoc">Get the sniffer's data accumulator value.</div><div class="ttdef"><b>Definition:</b> dma.h:839</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga355720e02713c7324b540efc6f632366"><div class="ttname"><a href="group__hardware__dma.html#ga355720e02713c7324b540efc6f632366">dma_channel_start</a></div><div class="ttdeci">static void dma_channel_start(uint channel)</div><div class="ttdoc">Start a single DMA channel.</div><div class="ttdef"><b>Definition:</b> dma.h:500</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga43f1fe10d5eb241788f72ad11599fc11"><div class="ttname"><a href="group__hardware__dma.html#ga43f1fe10d5eb241788f72ad11599fc11">dma_irqn_get_channel_status</a></div><div class="ttdeci">static bool dma_irqn_get_channel_status(uint irq_index, uint channel)</div><div class="ttdoc">Determine if a particular channel is a cause of DMA_IRQ_N.</div><div class="ttdef"><b>Definition:</b> dma.h:671</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga4b0a6680795b9c9ed787362a8a057206"><div class="ttname"><a href="group__hardware__dma.html#ga4b0a6680795b9c9ed787362a8a057206">dma_claim_unused_channel</a></div><div class="ttdeci">int dma_claim_unused_channel(bool required)</div><div class="ttdoc">Claim a free dma channel.</div><div class="ttdef"><b>Definition:</b> dma.c:45</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga4d4b5d461ff09bb6e4e2a05df3b7c75c"><div class="ttname"><a href="group__hardware__dma.html#ga4d4b5d461ff09bb6e4e2a05df3b7c75c">dma_channel_acknowledge_irq1</a></div><div class="ttdeci">static void dma_channel_acknowledge_irq1(uint channel)</div><div class="ttdoc">Acknowledge a channel IRQ, resetting it as the cause of DMA_IRQ_1.</div><div class="ttdef"><b>Definition:</b> dma.h:692</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga4f9415c8f77ff0bacedf5a138a88d76f"><div class="ttname"><a href="group__hardware__dma.html#ga4f9415c8f77ff0bacedf5a138a88d76f">dma_channel_set_irq1_enabled</a></div><div class="ttdeci">static void dma_channel_set_irq1_enabled(uint channel, bool enabled)</div><div class="ttdoc">Enable single DMA channel's interrupt via DMA_IRQ_1.</div><div class="ttdef"><b>Definition:</b> dma.h:587</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga58f9c3cb606759e4620c82583f833dc8"><div class="ttname"><a href="group__hardware__dma.html#ga58f9c3cb606759e4620c82583f833dc8">dma_timer_set_fraction</a></div><div class="ttdeci">static void dma_timer_set_fraction(uint timer, uint16_t numerator, uint16_t denominator)</div><div class="ttdoc">Set the multiplier for the given DMA timer.</div><div class="ttdef"><b>Definition:</b> dma.h:891</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga5da1507764272564a75939e2cf38fa9a"><div class="ttname"><a href="group__hardware__dma.html#ga5da1507764272564a75939e2cf38fa9a">dma_get_irq_num</a></div><div class="ttdeci">static int dma_get_irq_num(uint irq_index)</div><div class="ttdoc">Return DMA_IRQ_&lt;irqn&gt;</div><div class="ttdef"><b>Definition:</b> dma.h:916</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga6407f7763b533c98e23f65e35c5e48ee"><div class="ttname"><a href="group__hardware__dma.html#ga6407f7763b533c98e23f65e35c5e48ee">dma_start_channel_mask</a></div><div class="ttdeci">static void dma_start_channel_mask(uint32_t chan_mask)</div><div class="ttdoc">Start one or more channels simultaneously.</div><div class="ttdef"><b>Definition:</b> dma.h:490</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga655130988c1045bdf711135698adf321"><div class="ttname"><a href="group__hardware__dma.html#ga655130988c1045bdf711135698adf321">dma_channel_cleanup</a></div><div class="ttdeci">void dma_channel_cleanup(uint channel)</div><div class="ttdoc">Performs DMA channel cleanup after use.</div><div class="ttdef"><b>Definition:</b> dma.c:73</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga6c72cc3aafb409371f60fefd0463e289"><div class="ttname"><a href="group__hardware__dma.html#ga6c72cc3aafb409371f60fefd0463e289">DMA_IRQ_NUM</a></div><div class="ttdeci">#define DMA_IRQ_NUM(irq_index)</div><div class="ttdoc">Returns the irq_num_t for the nth DMA interrupt.</div><div class="ttdef"><b>Definition:</b> dma.h:56</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga6fefe19fa5539580315de923e42131d3"><div class="ttname"><a href="group__hardware__dma.html#ga6fefe19fa5539580315de923e42131d3">dma_irqn_set_channel_enabled</a></div><div class="ttdeci">static void dma_irqn_set_channel_enabled(uint irq_index, uint channel, bool enabled)</div><div class="ttdoc">Enable single DMA channel interrupt on either DMA_IRQ_0 or DMA_IRQ_1.</div><div class="ttdef"><b>Definition:</b> dma.h:617</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga720f2335e93b0e53e28959566ca18f3e"><div class="ttname"><a href="group__hardware__dma.html#ga720f2335e93b0e53e28959566ca18f3e">dma_irqn_set_channel_mask_enabled</a></div><div class="ttdeci">static void dma_irqn_set_channel_mask_enabled(uint irq_index, uint32_t channel_mask, bool enabled)</div><div class="ttdoc">Enable multiple DMA channels' interrupt via either DMA_IRQ_0 or DMA_IRQ_1.</div><div class="ttdef"><b>Definition:</b> dma.h:633</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga735e7c6c136c078689ead70790f4edb2"><div class="ttname"><a href="group__hardware__dma.html#ga735e7c6c136c078689ead70790f4edb2">dma_channel_abort</a></div><div class="ttdeci">static void dma_channel_abort(uint channel)</div><div class="ttdoc">Stop a DMA transfer.</div><div class="ttdef"><b>Definition:</b> dma.h:544</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga7449b659efb178a408f42f7f8f7b02f9"><div class="ttname"><a href="group__hardware__dma.html#ga7449b659efb178a408f42f7f8f7b02f9">dma_channel_set_config</a></div><div class="ttdeci">static void dma_channel_set_config(uint channel, const dma_channel_config *config, bool trigger)</div><div class="ttdoc">Set a channel configuration.</div><div class="ttdef"><b>Definition:</b> dma.h:383</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga75ef6881795fd1760fe813f9e0a79223"><div class="ttname"><a href="group__hardware__dma.html#ga75ef6881795fd1760fe813f9e0a79223">dma_get_timer_dreq</a></div><div class="ttdeci">static uint dma_get_timer_dreq(uint timer_num)</div><div class="ttdoc">Return the DREQ number for a given DMA timer.</div><div class="ttdef"><b>Definition:</b> dma.h:902</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga890490576d8806b8933aad0e34d09c5e"><div class="ttname"><a href="group__hardware__dma.html#ga890490576d8806b8933aad0e34d09c5e">dma_timer_unclaim</a></div><div class="ttdeci">void dma_timer_unclaim(uint timer)</div><div class="ttdoc">Mark a dma timer as no longer used.</div><div class="ttdef"><b>Definition:</b> dma.c:59</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga9110135d8161fc268d87dfb040d0f854"><div class="ttname"><a href="group__hardware__dma.html#ga9110135d8161fc268d87dfb040d0f854">dma_channel_transfer_to_buffer_now</a></div><div class="ttdeci">static void dma_channel_transfer_to_buffer_now(uint channel, volatile void *write_addr, uint32_t transfer_count)</div><div class="ttdoc">Start a DMA transfer to a buffer immediately.</div><div class="ttdef"><b>Definition:</b> dma.h:479</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga971d077ac39b2d7f7c6b45e2ddc5d190"><div class="ttname"><a href="group__hardware__dma.html#ga971d077ac39b2d7f7c6b45e2ddc5d190">dma_channel_configure</a></div><div class="ttdeci">static void dma_channel_configure(uint channel, const dma_channel_config *config, volatile void *write_addr, const volatile void *read_addr, uint transfer_count, bool trigger)</div><div class="ttdoc">Configure all DMA parameters and optionally start transfer.</div><div class="ttdef"><b>Definition:</b> dma.h:447</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga9aadb81f53b979bde1c1a81164d1eff2"><div class="ttname"><a href="group__hardware__dma.html#ga9aadb81f53b979bde1c1a81164d1eff2">dma_channel_is_claimed</a></div><div class="ttdeci">bool dma_channel_is_claimed(uint channel)</div><div class="ttdoc">Determine if a dma channel is claimed.</div><div class="ttdef"><b>Definition:</b> dma.c:49</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga9b45bfe6985f8c0894d34876eedc3090"><div class="ttname"><a href="group__hardware__dma.html#ga9b45bfe6985f8c0894d34876eedc3090">dma_timer_is_claimed</a></div><div class="ttdeci">bool dma_timer_is_claimed(uint timer)</div><div class="ttdoc">Determine if a dma timer is claimed.</div><div class="ttdef"><b>Definition:</b> dma.c:68</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ga9c9bcbe60b4c6102cae3e616476c4735"><div class="ttname"><a href="group__hardware__dma.html#ga9c9bcbe60b4c6102cae3e616476c4735">dma_sniffer_disable</a></div><div class="ttdeci">static void dma_sniffer_disable(void)</div><div class="ttdoc">Disable the DMA sniffer.</div><div class="ttdef"><b>Definition:</b> dma.h:818</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gaa2c5775bdb86d63a4866b2f6f5b41143"><div class="ttname"><a href="group__hardware__dma.html#gaa2c5775bdb86d63a4866b2f6f5b41143">dma_sniffer_set_output_reverse_enabled</a></div><div class="ttdeci">static void dma_sniffer_set_output_reverse_enabled(bool reverse)</div><div class="ttdoc">Enable the Sniffer output bit reversal function.</div><div class="ttdef"><b>Definition:</b> dma.h:807</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gaa430bc53dc2b36d727ad976f6348c8b3"><div class="ttname"><a href="group__hardware__dma.html#gaa430bc53dc2b36d727ad976f6348c8b3">dma_claim_mask</a></div><div class="ttdeci">void dma_claim_mask(uint32_t channel_mask)</div><div class="ttdoc">Mark multiple dma channels as used.</div><div class="ttdef"><b>Definition:</b> dma.c:28</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gaa86e892c47b054d3c22fa39c001c7c23"><div class="ttname"><a href="group__hardware__dma.html#gaa86e892c47b054d3c22fa39c001c7c23">dma_channel_get_irq0_status</a></div><div class="ttdeci">static bool dma_channel_get_irq0_status(uint channel)</div><div class="ttdoc">Determine if a particular channel is a cause of DMA_IRQ_0.</div><div class="ttdef"><b>Definition:</b> dma.h:648</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gaaa20edc55a2cc4977d24bdb487a22aa5"><div class="ttname"><a href="group__hardware__dma.html#gaaa20edc55a2cc4977d24bdb487a22aa5">dma_set_irq1_channel_mask_enabled</a></div><div class="ttdeci">static void dma_set_irq1_channel_mask_enabled(uint32_t channel_mask, bool enabled)</div><div class="ttdoc">Enable multiple DMA channels' interrupts via DMA_IRQ_1.</div><div class="ttdef"><b>Definition:</b> dma.h:602</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gab57c68850b8e6ed1623de75ad611db62"><div class="ttname"><a href="group__hardware__dma.html#gab57c68850b8e6ed1623de75ad611db62">dma_channel_wait_for_finish_blocking</a></div><div class="ttdeci">static void dma_channel_wait_for_finish_blocking(uint channel)</div><div class="ttdoc">Wait for a DMA channel transfer to complete.</div><div class="ttdef"><b>Definition:</b> dma.h:725</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gabf64c461a405a8114591105d9dc53575"><div class="ttname"><a href="group__hardware__dma.html#gabf64c461a405a8114591105d9dc53575">dma_channel_transfer_from_buffer_now</a></div><div class="ttdeci">static void dma_channel_transfer_from_buffer_now(uint channel, const volatile void *read_addr, uint32_t transfer_count)</div><div class="ttdoc">Start a DMA transfer from a buffer immediately.</div><div class="ttdef"><b>Definition:</b> dma.h:463</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gabf6f6ffe56fa42dcb105032f110589ae"><div class="ttname"><a href="group__hardware__dma.html#gabf6f6ffe56fa42dcb105032f110589ae">dma_channel_set_read_addr</a></div><div class="ttdeci">static void dma_channel_set_read_addr(uint channel, const volatile void *read_addr, bool trigger)</div><div class="ttdoc">Set the DMA initial read address.</div><div class="ttdef"><b>Definition:</b> dma.h:399</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gac3b250d97550527a584de9d3f770acea"><div class="ttname"><a href="group__hardware__dma.html#gac3b250d97550527a584de9d3f770acea">dma_sniffer_set_byte_swap_enabled</a></div><div class="ttdeci">static void dma_sniffer_set_byte_swap_enabled(bool swap)</div><div class="ttdoc">Enable the Sniffer byte swap function.</div><div class="ttdef"><b>Definition:</b> dma.h:777</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gac50200739b88a2fd52316f4150533035"><div class="ttname"><a href="group__hardware__dma.html#gac50200739b88a2fd52316f4150533035">dma_channel_unclaim</a></div><div class="ttdeci">void dma_channel_unclaim(uint channel)</div><div class="ttdoc">Mark a dma channel as no longer used.</div><div class="ttdef"><b>Definition:</b> dma.c:34</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gacab1f8010c206dfc77b81cb16902a4e4"><div class="ttname"><a href="group__hardware__dma.html#gacab1f8010c206dfc77b81cb16902a4e4">dma_sniffer_set_data_accumulator</a></div><div class="ttdeci">static void dma_sniffer_set_data_accumulator(uint32_t seed_value)</div><div class="ttdoc">Set the sniffer's data accumulator with initial value.</div><div class="ttdef"><b>Definition:</b> dma.h:830</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gaccecdff367b06a019373e9a55d4f3e01"><div class="ttname"><a href="group__hardware__dma.html#gaccecdff367b06a019373e9a55d4f3e01">dma_channel_transfer_size</a></div><div class="ttdeci">dma_channel_transfer_size</div><div class="ttdoc">Enumeration of available DMA channel transfer sizes.</div><div class="ttdef"><b>Definition:</b> dma.h:143</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gad0e8e022fbe67b80c16912254526fada"><div class="ttname"><a href="group__hardware__dma.html#gad0e8e022fbe67b80c16912254526fada">dma_irqn_acknowledge_channel</a></div><div class="ttdeci">static void dma_irqn_acknowledge_channel(uint irq_index, uint channel)</div><div class="ttdoc">Acknowledge a channel IRQ, resetting it as the cause of DMA_IRQ_N.</div><div class="ttdef"><b>Definition:</b> dma.h:703</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gad5c1ac22e0b4d9b831912fbb95460be4"><div class="ttname"><a href="group__hardware__dma.html#gad5c1ac22e0b4d9b831912fbb95460be4">dma_set_irq0_channel_mask_enabled</a></div><div class="ttdeci">static void dma_set_irq0_channel_mask_enabled(uint32_t channel_mask, bool enabled)</div><div class="ttdoc">Enable multiple DMA channels' interrupts via DMA_IRQ_0.</div><div class="ttdef"><b>Definition:</b> dma.h:573</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gae1b3c916746b3d2052f21b7dda34aab9"><div class="ttname"><a href="group__hardware__dma.html#gae1b3c916746b3d2052f21b7dda34aab9">dma_channel_claim</a></div><div class="ttdeci">void dma_channel_claim(uint channel)</div><div class="ttdoc">Mark a dma channel as used.</div><div class="ttdef"><b>Definition:</b> dma.c:23</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gaf0156609fe51c07d07118b2aeb4e9ae6"><div class="ttname"><a href="group__hardware__dma.html#gaf0156609fe51c07d07118b2aeb4e9ae6">dma_channel_set_write_addr</a></div><div class="ttdeci">static void dma_channel_set_write_addr(uint channel, volatile void *write_addr, bool trigger)</div><div class="ttdoc">Set the DMA initial write address.</div><div class="ttdef"><b>Definition:</b> dma.h:414</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gaf60011d46676c87b7139f37188eaa4b9"><div class="ttname"><a href="group__hardware__dma.html#gaf60011d46676c87b7139f37188eaa4b9">dma_channel_set_irq0_enabled</a></div><div class="ttdeci">static void dma_channel_set_irq0_enabled(uint channel, bool enabled)</div><div class="ttdoc">Enable single DMA channel's interrupt via DMA_IRQ_0.</div><div class="ttdef"><b>Definition:</b> dma.h:558</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gaf61d25264e49058d20fb607dc1c40981"><div class="ttname"><a href="group__hardware__dma.html#gaf61d25264e49058d20fb607dc1c40981">dma_channel_get_irq1_status</a></div><div class="ttdeci">static bool dma_channel_get_irq1_status(uint channel)</div><div class="ttdoc">Determine if a particular channel is a cause of DMA_IRQ_1.</div><div class="ttdef"><b>Definition:</b> dma.h:659</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gafbb5020a529ed6d39a11da88a6f313f2"><div class="ttname"><a href="group__hardware__dma.html#gafbb5020a529ed6d39a11da88a6f313f2">dma_channel_is_busy</a></div><div class="ttdeci">static bool dma_channel_is_busy(uint channel)</div><div class="ttdoc">Check if DMA channel is busy.</div><div class="ttdef"><b>Definition:</b> dma.h:715</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gafefe50f20c44bcfa7f729829a5d494f4"><div class="ttname"><a href="group__hardware__dma.html#gafefe50f20c44bcfa7f729829a5d494f4">dma_channel_acknowledge_irq0</a></div><div class="ttdeci">static void dma_channel_acknowledge_irq0(uint channel)</div><div class="ttdoc">Acknowledge a channel IRQ, resetting it as the cause of DMA_IRQ_0.</div><div class="ttdef"><b>Definition:</b> dma.h:682</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gga6f0a19defc495cfa6078364122266014a11c9291490c2ddf45df69f45a2f83dcf"><div class="ttname"><a href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a11c9291490c2ddf45df69f45a2f83dcf">DREQ_DMA_TIMER1</a></div><div class="ttdeci">@ DREQ_DMA_TIMER1</div><div class="ttdoc">Select DMA_TIMER0 as DREQ.</div><div class="ttdef"><b>Definition:</b> dreq.h:138</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gga6f0a19defc495cfa6078364122266014a49bb6d90479edbff257068afd1a5bfe1"><div class="ttname"><a href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a49bb6d90479edbff257068afd1a5bfe1">DREQ_DMA_TIMER0</a></div><div class="ttdeci">@ DREQ_DMA_TIMER0</div><div class="ttdoc">Select DMA_TIMER0 as DREQ.</div><div class="ttdef"><b>Definition:</b> dreq.h:137</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gga6f0a19defc495cfa6078364122266014a86d08425822a129c3eaa1479e920c67c"><div class="ttname"><a href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014a86d08425822a129c3eaa1479e920c67c">DREQ_DMA_TIMER3</a></div><div class="ttdeci">@ DREQ_DMA_TIMER3</div><div class="ttdoc">Select DMA_TIMER3 as DREQ.</div><div class="ttdef"><b>Definition:</b> dreq.h:140</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gga6f0a19defc495cfa6078364122266014abb60a9d9038192f9db081b51b9c23f65"><div class="ttname"><a href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014abb60a9d9038192f9db081b51b9c23f65">DREQ_DMA_TIMER2</a></div><div class="ttdeci">@ DREQ_DMA_TIMER2</div><div class="ttdoc">Select DMA_TIMER1 as DREQ.</div><div class="ttdef"><b>Definition:</b> dreq.h:139</div></div>
<div class="ttc" id="agroup__hardware__dma_html_gga6f0a19defc495cfa6078364122266014ae683f0bb3ee8b854fe4cea850cf9d4c8"><div class="ttname"><a href="group__hardware__dma.html#gga6f0a19defc495cfa6078364122266014ae683f0bb3ee8b854fe4cea850cf9d4c8">DREQ_FORCE</a></div><div class="ttdeci">@ DREQ_FORCE</div><div class="ttdoc">Select FORCE as DREQ.</div><div class="ttdef"><b>Definition:</b> dreq.h:141</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ggaccecdff367b06a019373e9a55d4f3e01a2e343022ac046b6b67bb99eebc833cfc"><div class="ttname"><a href="group__hardware__dma.html#ggaccecdff367b06a019373e9a55d4f3e01a2e343022ac046b6b67bb99eebc833cfc">DMA_SIZE_16</a></div><div class="ttdeci">@ DMA_SIZE_16</div><div class="ttdoc">Half word transfer (16 bits)</div><div class="ttdef"><b>Definition:</b> dma.h:145</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ggaccecdff367b06a019373e9a55d4f3e01abd7d246406a2ebe4dd49780db176dc3c"><div class="ttname"><a href="group__hardware__dma.html#ggaccecdff367b06a019373e9a55d4f3e01abd7d246406a2ebe4dd49780db176dc3c">DMA_SIZE_8</a></div><div class="ttdeci">@ DMA_SIZE_8</div><div class="ttdoc">Byte transfer (8 bits)</div><div class="ttdef"><b>Definition:</b> dma.h:144</div></div>
<div class="ttc" id="agroup__hardware__dma_html_ggaccecdff367b06a019373e9a55d4f3e01abf1030013f4ad74b45d25cd9a07b6296"><div class="ttname"><a href="group__hardware__dma.html#ggaccecdff367b06a019373e9a55d4f3e01abf1030013f4ad74b45d25cd9a07b6296">DMA_SIZE_32</a></div><div class="ttdeci">@ DMA_SIZE_32</div><div class="ttdoc">Word transfer (32 bits)</div><div class="ttdef"><b>Definition:</b> dma.h:146</div></div>
<div class="ttc" id="agroup__pico__platform_html_gab0d1ba75ceb64131e19f613d7a5313c9"><div class="ttname"><a href="group__pico__platform.html#gab0d1ba75ceb64131e19f613d7a5313c9">tight_loop_contents</a></div><div class="ttdeci">static __force_inline void tight_loop_contents(void)</div><div class="ttdoc">No-op function for the body of tight loops.</div><div class="ttdef"><b>Definition:</b> platform.h:67</div></div>
<div class="ttc" id="agroup__pico__platform_html_gac01ec0ae597f7572f8e298fa4f48c8e6"><div class="ttname"><a href="group__pico__platform.html#gac01ec0ae597f7572f8e298fa4f48c8e6">__compiler_memory_barrier</a></div><div class="ttdeci">static __always_inline void __compiler_memory_barrier(void)</div><div class="ttdoc">Ensure that the compiler does not move memory access across this method call.</div><div class="ttdef"><b>Definition:</b> compiler.h:171</div></div>
<div class="ttc" id="apico_8h_html"><div class="ttname"><a href="pico_8h.html">pico.h</a></div></div>
<div class="ttc" id="astructdma__channel__config_html"><div class="ttname"><a href="structdma__channel__config.html">dma_channel_config</a></div><div class="ttdef"><b>Definition:</b> dma.h:149</div></div>
<div class="ttc" id="astructdma__channel__hw__t_html"><div class="ttname"><a href="structdma__channel__hw__t.html">dma_channel_hw_t</a></div><div class="ttdef"><b>Definition:</b> dma.h:27</div></div>
<div class="ttc" id="astructdma__hw__t_html"><div class="ttname"><a href="structdma__hw__t.html">dma_hw_t</a></div><div class="ttdef"><b>Definition:</b> dma.h:146</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>